<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.css" integrity="sha256-6cQIC71/iBIYXFK+0RHAvwmjwWzkWd+r7v/BX3/vZDc=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/themes/green/pace-theme-minimal.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"sumumm.github.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.19.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"fold":{"enable":true,"height":300},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="本文主要是STM32开发——电源管理的一些基础知识相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:type" content="article">
<meta property="og:title" content="LV16-29-电源管理-01-基础知识">
<meta property="og:url" content="https://sumumm.github.io/post/f6279550.html">
<meta property="og:site_name" content="苏木">
<meta property="og:description" content="本文主要是STM32开发——电源管理的一些基础知识相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610161402601.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610161930674.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610162153818.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610162430634.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610162437780.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610165631308.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610165726268.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610165920860.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610170342069.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610170811343.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610170844137.png">
<meta property="article:published_time" content="2023-06-11T08:25:11.000Z">
<meta property="article:modified_time" content="2025-06-13T16:25:57.015Z">
<meta property="article:author" content="苏木">
<meta property="article:tag" content="LV16-STM32开发">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610161402601.png">


<link rel="canonical" href="https://sumumm.github.io/post/f6279550.html">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://sumumm.github.io/post/f6279550.html","path":"post/f6279550.html","title":"LV16-29-电源管理-01-基础知识"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>LV16-29-电源管理-01-基础知识 | 苏木</title>
  








    <script src="/js/browser_tools_disable.js"></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<!-- hexo injector head_end start --><link rel="stylesheet" href="https://unpkg.com/hexo-next-tags-plus@latest/lib/tag_plus.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">苏木</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">我的学习之路</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>苏木的家</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类页<span class="badge">42</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档页<span class="badge">673</span></a></li><li class="menu-item menu-item-flink"><a href="/flink/" rel="section"><i class="fa fa-link fa-fw"></i>友人帐</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于我</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81STM32%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86"><span class="nav-text">一、STM32电源管理</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86%E7%AE%80%E4%BB%8B"><span class="nav-text">1. 电源管理简介</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E7%94%B5%E6%BA%90%E7%B3%BB%E7%BB%9F%E7%BB%93%E6%9E%84"><span class="nav-text">2. 电源系统结构</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E7%94%B5%E6%BA%90%E7%9B%91%E6%8E%A7%E5%99%A8"><span class="nav-text">3. 电源监控器</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-%E4%B8%8A%E7%94%B5%E5%A4%8D%E4%BD%8D%E4%B8%8E%E6%8E%89%E7%94%B5%E5%A4%8D%E4%BD%8D-POR-%E4%B8%8E-PDR"><span class="nav-text">3.1 上电复位与掉电复位 (POR 与 PDR)  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-%E5%8F%AF%E7%BC%96%E7%A8%8B%E7%94%B5%E5%8E%8B%E6%A3%80%E6%B5%8B%E5%99%A8-PVD"><span class="nav-text">3.2 可编程电压检测器 PVD  </span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-%E7%94%B5%E5%8E%8B%E8%B0%83%E8%8A%82%E5%99%A8"><span class="nav-text">4. 电压调节器</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81STM32%E5%8A%9F%E8%80%97%E6%A8%A1%E5%BC%8F"><span class="nav-text">二、STM32功耗模式</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E4%B8%89%E7%A7%8D%E4%BD%8E%E5%8A%9F%E8%80%97%E6%A8%A1%E5%BC%8F"><span class="nav-text">1. 三种低功耗模式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E4%B8%89%E7%A7%8D%E6%A8%A1%E5%BC%8F%E8%AF%B4%E6%98%8E"><span class="nav-text">2. 三种模式说明</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-%E7%9D%A1%E7%9C%A0%E6%A8%A1%E5%BC%8F"><span class="nav-text">2.1 睡眠模式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-%E5%81%9C%E6%AD%A2%E6%A8%A1%E5%BC%8F"><span class="nav-text">2.2 停止模式  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3-%E5%BE%85%E6%9C%BA%E6%A8%A1%E5%BC%8F"><span class="nav-text">2.3 待机模式</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E7%9B%B8%E5%85%B3%E5%AF%84%E5%AD%98%E5%99%A8"><span class="nav-text">三、相关寄存器</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E7%94%B5%E6%BA%90%E6%8E%A7%E5%88%B6%E5%AF%84%E5%AD%98%E5%99%A8-PWR-CR"><span class="nav-text">1. 电源控制寄存器(PWR_CR) </span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E7%94%B5%E6%BA%90%E6%8E%A7%E5%88%B6-%E7%8A%B6%E6%80%81%E5%AF%84%E5%AD%98%E5%99%A8-PWR-CSR"><span class="nav-text">2. 电源控制&#x2F;状态寄存器(PWR_CSR) </span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E5%BA%93%E5%87%BD%E6%95%B0%E4%B8%8E%E5%91%BD%E4%BB%A4"><span class="nav-text">四、库函数与命令</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-WFI%E4%B8%8EWFE%E5%91%BD%E4%BB%A4"><span class="nav-text">1. WFI与WFE命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-HAL-PWR-ConfigPVD"><span class="nav-text">2. HAL_PWR_ConfigPVD()</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-HAL-PWR-EnterSLEEPMode"><span class="nav-text">3. HAL_PWR_EnterSLEEPMode()</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-HAL-PWR-EnterSTOPMode"><span class="nav-text">4. HAL_PWR_EnterSTOPMode()</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-HAL-PWR-EnterSTANDBYMode"><span class="nav-text">5. HAL_PWR_EnterSTANDBYMode()</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="苏木"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">苏木</p>
  <div class="site-description" itemprop="description">莫道桑榆晚，为霞尚满天</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">673</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">43</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/sumumm" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;sumumm" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://sumumm.github.io/post/f6279550.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="苏木">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="苏木">
      <meta itemprop="description" content="莫道桑榆晚，为霞尚满天">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="LV16-29-电源管理-01-基础知识 | 苏木">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          LV16-29-电源管理-01-基础知识
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2023-06-11 16:25:11" itemprop="dateCreated datePublished" datetime="2023-06-11T16:25:11+08:00">2023-06-11</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/" itemprop="url" rel="index"><span itemprop="name">嵌入式开发</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/" itemprop="url" rel="index"><span itemprop="name">01HQ课程体系</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/" itemprop="url" rel="index"><span itemprop="name">LV16-STM32开发</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>6.4k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>23 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p>本文主要是STM32开发——电源管理的一些基础知识相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。</p>
<span id="more"></span>

<!-- Photo: https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/ -->

<details class="folding-tag" blue><summary> 点击查看使用工具及版本 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center" width=150px>Windows</td>        <td align="left">windows11</td>    </tr>    <tr>        <td align="center">Ubuntu</td>        <td align="left">Ubuntu16.04的64位版本</td>      </tr>    <tr>        <td align="center">VMware® Workstation 16 Pro</td>        <td align="left">16.2.3 build-19376536</td>      </tr>    <tr>        <td align="center">SecureCRT</td>        <td align="left">Version 8.7.2 (x64 build 2214)   -   正式版-2020年5月14日</td>      </tr>    <tr>        <td align="center">开发板</td>        <td align="left">正点原子 i.MX6ULL Linux阿尔法开发板</td>      </tr>    <tr>        <td align="center">uboot</td>        <td align="left">NXP官方提供的uboot，NXP提供的版本为uboot-imx-rel_imx_4.1.15_2.1.0_ga(使用的uboot版本为U-Boot 2016.03)</td>      </tr>    <tr>        <td align="center">linux内核</td>        <td align="left">linux-4.15(NXP官方提供)</td>      </tr>    <tr>        <td align="center">STM32开发板</td>        <td align="left">正点原子战舰V3(STM32F103ZET6)</td>      </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看本文参考资料 </summary>
              <div class='content'>
              <ul><li>通用</li></ul><table><tr><td align="center">分类  </td><td align="center">网址</td><td align="center">说明</td></tr><tr><td align="center" rowspan="4">官方网站</td><td align="left"><a href="https://www.arm.com/" target="_blank">https://www.arm.com/</a></td><td align="left">ARM官方网站，在这里我们可以找到Cotex-Mx以及ARMVx的一些文档</td></tr><tr>                                            <td align="left"><a href="https://www.st.com/content/st_com/zh.html" target="_blank">https://www.st.com/content/st_com/zh.html</a></td><td align="left">ST官方网站，在这里我们可以找到STM32的相关文档</td></tr><tr>                                            <td align="left"><a href="https://www.stmcu.com.cn/" target="_blank">https://www.stmcu.com.cn/</a></td><td align="left">意法半导体ST中文官方网站，在这里我们可以找到STM32的相关中文参考文档</td></tr><tr>                                            <td align="left"><a href="http://elm-chan.org/fsw/ff/00index_e.html" target="_blank">http://elm-chan.org/fsw/ff/00index_e.html</a></td><td align="left">FatFs文件系统官网</td></tr><tr><td align="center" rowspan="3">教程书籍</td><td align="left"><a href="STM32开发相关资料/01ARM参考资料/ARM Cortex-M3权威指南(中文).pdf" target="_blank">《ARM Cortex-M3权威指南》</a></td><td alirn="left" rowspan="3">ARM公司专家Joseph Yiu（姚文祥）的力作，中文翻译是NXP的宋岩</td></tr><tr>                                            <td align="left"><a href="STM32开发相关资料/01ARM参考资料/ARM Cortex-M0权威指南(中文).pdf" target="_blank">《ARM Cortex-M0权威指南》</a></td></tr><tr>                                            <td align="left"><a href="" target="_blank">《ARM Cortex-M3与Cortex-M4权威指南》</a></td></tr><tr><td align="center" rowspan="4">开发论坛</td><td align="left"><a href="http://47.111.11.73/forum.php" target="_blank">http://47.111.11.73/forum.php</a></td><td align="left">开源电子网，正点原子的资料下载及问题讨论论坛</td></tr><tr>                                            <td align="left"><a href="https://www.firebbs.cn/forum.php" target="_blank">https://www.firebbs.cn/forum.php</a></td><td align="left">国内Kinetis开发板-野火/秉火（刘火良）主持的论坛，现也做STM32和i.MX RT</td></tr><tr>                                            <td align="left"><a href="https://www.amobbs.com/index.php" target="_blank">https://www.amobbs.com/index.php</a></td><td align="left">阿莫（莫进明）主持的论坛，号称国内最早最火的电子论坛，以交流Atmel AVR系列单片机起家，现已拓展到嵌入式全平台，其STM32系列帖子有70W+。</td></tr><tr>                                            <td align="left"><a href="http://download.100ask.net/index.html" target="_blank">http://download.100ask.net/index.html</a></td><td align="left">韦东山嵌入式资料中心，有些STM32和linux的相关资料也可以来这里找。</td></tr><tr><td align="center" rowspan="3">博客参考</td><td align="left"><a href="http://www.openedv.com/" target="_blank">http://www.openedv.com/</a></td><td align="left">开源网-原子哥个人博客</td></tr><tr>                                            <td align="left"><a href="http://blog.chinaaet.com/jihceng0622" target="_blank">http://blog.chinaaet.com/jihceng0622</a></td><td align="left">博主是原Freescale现NXP的现场应用工程师</td></tr><tr>                                            <td align="left"><a href="https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/cortex-m-resources" target="_blank">cortex-m-resources</a></td><td align="left">这其实并不算是一个博客，这是ARM公司专家Joseph Yiu收集整理的所有对开发者有用的官方Cortex-M资料链接（也包含极少数外部资源链接）</td></tr></table><ul><li>STM32</li></ul><table>    <tr><td align="center" rowspan="2">STM32</td><td align="left"><a href="https://doc.embedfire.com/mcu/stm32/f103/hal_general/zh/latest/index.html" target="_blank">STM32 HAL库开发实战指南——基于F103系列开发板</a></td><td align="left">野火STM32开发教程在线文档</td></tr><tr>                                            <td align="left"><a href="https://doc.embedfire.com/mcu/stm32/f103badao/std/zh/latest/index.html" target="_blank">STM32库开发实战指南——基于野火霸道开发板</a></td><td align="left">野火STM32开发教程在线文档</td></tr></table><ul><li>SD卡</li></ul><table>    <tr><td align="left"><a href="https://www.sdcard.org/" target="_blank">SD Association</a></td><td align="left">提供了SD存储卡和SDIO卡系统规范</td></tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看相关文件下载 </summary>
              <div class='content'>
              <table>    <tr><td align="left"><a href="https://www.st.com/resource/en/datasheet/stm32f103ze.pdf" target="_blank">STM32F103xx英文数据手册</a></td><td align="left">STM32F103xC/D/E系列的英文数据手册</td></tr>    <tr><td align="left"><a href="https://www.stmcu.com.cn/Designresource/detail/localization_document%20/709978" target="_blank">STM32F103xx中文数据手册</a></td><td align="left">STM32F103xC/D/E系列的中文数据手册</td></tr>    <tr><td align="left"><a href="https://www.st.com/resource/en/reference_manual/rm0008-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf" target="_blank">STM32F10xxx英文参考手册（RM0008）</a></td><td align="left">STM32F10xxx系列的英文参考手册</td></tr>    <tr><td align="left"><a href="https://www.stmcu.com.cn/Designresource/detail/localization_document%20/710001" target="_blank">STM32F10xxx中文参考手册（RM0008）</a></td><td align="left">STM32F10xxx系列的中文参考手册</td></tr>    <tr><td align="left"><a href="https://developer.arm.com/documentation/100165/0201/?lang=en" target="_blank">Arm Cortex-M3 处理器技术参考手册-英文版</a></td><td align="left">Cortex-M3技术参考手册-英文版</td></tr>    <tr><td align="left"><a href="https://www.st.com/resource/en/programming_manual/pm0056-stm32f10xxx20xxx21xxxl1xxxx-cortexm3-programming-manual-stmicroelectronics.pdf" target="_blank">STM32F10xxx Cortex-M3编程手册-英文版(PM0056)</a></td><td align="left">STM32F10xxx/20xxx/21xxx/L1xxxx系列Cortex-M3编程手册-英文版</td></tr>    <tr><td align="left"><a href="https://www.sdcard.org/downloads/pls/" target="_blank">SD卡相关资料——最新版本</a></td><td align="left">有关SD卡的一些资料可以从这里下载</td></tr>    <tr><td align="left"><a href="https://www.sdcard.org/downloads/pls/archives/" target="_blank">SD卡相关资料——历史版本</a></td><td align="left">有关SD卡的一些历史版本资料可以从这里下载，比如后边看的SD卡2.0协议</td></tr>    <tr><td align="left"><a href="./" target="_blank">SD 2.0 协议标准完整版</a></td><td align="left">这是一篇关于SD卡2.0协议的中文文档，还是比较有参考价值的，可以一看</td></tr></table>
              </div>
            </details> 

<h1 id="一、STM32电源管理"><a href="#一、STM32电源管理" class="headerlink" title="一、STM32电源管理"></a><font size=3>一、STM32电源管理</font></h1><h2 id="1-电源管理简介"><a href="#1-电源管理简介" class="headerlink" title="1. 电源管理简介"></a><font size=3>1. 电源管理简介</font></h2><p>电源对电子设备的重要性不言而喻，它是保证系统稳定运行的基础，而保证系统能稳定运行后，又有<strong>低功耗</strong>的要求。</p>
<p>在很多应用场合中都对电子设备的功耗要求非常苛刻，如某些传感器信息采集设备，仅靠小型的电池提供电源，要求工作长达数年之久，且期间不需要任何维护；由于智慧穿戴设备的小型化要求，电池体积不能太大导致容量也比较小，所以也很有必要从控制功耗入手，提高设备的续行时间。</p>
<p>因此， STM32 有专门的电源管理外设监控电源并管理设备的运行模式，确保系统正常运行，并尽量降低器件的功耗。  </p>
<h2 id="2-电源系统结构"><a href="#2-电源系统结构" class="headerlink" title="2. 电源系统结构"></a><font size=3>2. 电源系统结构</font></h2><p>为了方便进行电源管理， STM32把它的外设、内核等模块跟据功能划分了供电区域，其内部电源区域划分如图。  我们可以看一下 [STM32中文参考手册](<a target="_blank" rel="noopener" href="https://www.stmcu.com.cn/Designresource/detail/localization_document">https://www.stmcu.com.cn/Designresource/detail/localization_document</a> &#x2F;710001)的4.1 电源一节：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610161402601.png" alt="image-20230610161402601" style="zoom:50%;" />

<p>①、VDDA供电区域： 该部分为ADC、 DAC等部分模拟外设供电。如 ADC的工作电源使用VDDA引脚输入，使用VSSA作为独立的地连接，VREF引脚则为ADC提供测量使用的参考电压。 独立出电源方便添加一些去耦电容进行滤波。 该区域由VDDA输入， VSSA接地， VREF提供参考电压。</p>
<p>②、VDD供电区域： 该部分为I&#x2F;O、 待机电路、电压调节器供电。 电压调节器可以运行在“运行模式”、“停止模式” 和“待机模式”，为后面的1.8V供电区域供电。 低功耗，实质就是对电压调节器进行配置，使其工作在不同的模式，实现低功耗。 前面学习的IWDG属于VDD供电区域，不受低功耗模式影响，系统处于低功耗模式也能正常工作。</p>
<p>③、1.8V供电区域： 该部分为CPU核心、存储器以及数字部分外设供电。电压调节器为其提供1.8V左右电压，因此本区域被称为1.8V供电区域。电压调节器处于运行模式时，本区域正常运行；处于停止模式时，本区域所有时钟关闭，外设保持“暂停”状态， 会保留内核寄存器以及SRAM内容；处于待机模式时，本区域断电，所有寄存器（后备供电区域的寄存器除外） 和SRAM数据丢失。</p>
<p>④、后备供电区域（备份域电路）： 该部分为LSE 32K晶振、后备寄存器、 RCC BDCR寄存器和RTC供电。 系统正常工作时，由VDD供电；系统突然调电时，由VBAT供电。 本区域不受低功耗模式影响，比如电压调节器处于待机模式， RTC也正常工作， 后备寄存器数据也不会丢失。  一般在实际应用中，这一部分一般会使用3V的钮扣电池对该引脚供电。  </p>
<p>在图中备份域电路的左侧有一个电源开关结构，它的功能类似下图的双二极管，在它的“1”处连接了VBAT电源，“2”处连接了VDD主电源(一般为3.3V)，右侧“3”处引出到备份域电路中。当VDD主电源存在时，由于VDD电压较高，备份域电路通过VDD供电，节省钮扣电池的电源，仅当VDD掉电时，备份域电路由钮扣电池通过VBAT供电，保证电路能持续运行，从而可利用它保留关键数据。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610161930674.png" alt="image-20230610161930674" style="zoom:50%;" />



<h2 id="3-电源监控器"><a href="#3-电源监控器" class="headerlink" title="3. 电源监控器"></a><font size=3>3. 电源监控器</font></h2><p>STM32芯片主要通过引脚VDD从外部获取电源，在它的内部具有电源监控器用于检测VDD的电压，以实现复位功能及掉电紧急处理功能，保证系统可靠地运行。  </p>
<h3 id="3-1-上电复位与掉电复位-POR-与-PDR"><a href="#3-1-上电复位与掉电复位-POR-与-PDR" class="headerlink" title="3.1 上电复位与掉电复位 (POR 与 PDR)  "></a><font size=3>3.1 上电复位与掉电复位 (POR 与 PDR)  </font></h3><p>当检测到 VDD 的电压低于阈值 VPOR 及 VPDR 时，无需外部电路辅助， STM32 芯片会自动保持在复位状态，防止因电压不足强行工作而带来严重的后果。见图 POR 与 PDR ，在刚开始电压低于 VPOR 时 (约 1.92V)， STM32 保持在上电复位状态 (POR， Power On Reset)，当 VDD 电压持续上升至大于 VPOR时，芯片开始正常运行，而在芯片正常运行的时候，当检测到 VDD 电压下降至低于 VPDR 阈值 (约 1.88V)，会进入掉电复位状态 (PDR， Power Down Reset)。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610162153818.png" alt="image-20230610162153818" style="zoom:50%;" />

<h3 id="3-2-可编程电压检测器-PVD"><a href="#3-2-可编程电压检测器-PVD" class="headerlink" title="3.2 可编程电压检测器 PVD  "></a><font size=3>3.2 可编程电压检测器 PVD  </font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610162430634.png" alt="image-20230610162430634" style="zoom:50%;" />

<p>上述 POR、 PDR 功能是使用其电压阈值与外部供电电压 VDD 比较，当低于工作阈值时，会直接进入复位状态，这可防止电压不足导致的误操作。除此之外， STM32 还提供了可编程电压检测器 PVD，它也是实时检测 VDD 的电压，当检测到电压低于编程的 VPVD 阈值时，会向内核产生一个 PVD 中断 (EXTI16 线中断) 以使内核在复位前进行紧急处理。该电压阈值可通过电源控制寄存器 PWR_CSR 设置。使用 PVD 可配置 8 个等级，见下表：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610162437780.png" alt="image-20230610162437780" style="zoom:50%;" />

<p>其中的上升沿和下降沿分别表示类似图 POR与 PDR 中 VDD 电压上升过程及下降过程的阈值。  </p>
<h2 id="4-电压调节器"><a href="#4-电压调节器" class="headerlink" title="4. 电压调节器"></a><font size=3>4. 电压调节器</font></h2><p>复位后电压调节器总是使能的。根据应用方式它以3种不同的模式工作：</p>
<ul>
<li><p>运转模式：调节器以正常功耗模式提供1.8V电源(内核，内存和外设)。</p>
</li>
<li><p>停止模式：调节器以低功耗模式提供1.8V电源，以保存寄存器和SRAM的内容。</p>
</li>
<li><p>待机模式：调节器停止供电。除了备用电路和备份域外，寄存器和SRAM的内容全部丢失。</p>
</li>
</ul>
<h1 id="二、STM32功耗模式"><a href="#二、STM32功耗模式" class="headerlink" title="二、STM32功耗模式"></a><font size=3>二、STM32功耗模式</font></h1><p>在系统或电源复位以后，微控制器处于运行状态。当CPU不需继续运行时，可以利用多种低功 耗模式来节省功耗，例如等待某个外部事件时。用户需要根据最低电源消耗、最快速启动时间 和可用的唤醒源等条件，选定一个最佳的低功耗模式。</p>
<h2 id="1-三种低功耗模式"><a href="#1-三种低功耗模式" class="headerlink" title="1. 三种低功耗模式"></a><font size=3>1. 三种低功耗模式</font></h2><p>按功耗由高到低排列， STM32具有运行、睡眠、停止和待机四种工作模式。上电复位后STM32处于运行状态时，当内核不需要继续运行，就可以选择进入后面的三种低功耗模式降低功耗，这三种模式中，电源消耗不同、唤醒时间不同、唤醒源不同，用户需要根据应用需求，选择最佳的低功耗模式。三种低功耗的模式说明见下表：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610165631308.png" alt="image-20230610165631308" style="zoom:80%;" />

<p>这三种低功耗模式层层递进，运行的时钟或芯片功能越来越少，因而功耗越来越低。最低功耗的是待机模式，在此模式下，最低只需要 2uA 左右的电流。停机模式是次低功耗的，其典型的电流消耗在 20uA 左右。最后就是睡眠模式了。用户可以根据自己的需求来决定使用哪种低功耗模式。    </p>
<h2 id="2-三种模式说明"><a href="#2-三种模式说明" class="headerlink" title="2. 三种模式说明"></a><font size=3>2. 三种模式说明</font></h2><p>【注意】睡眠模式、停止模式及待机模式中，若备份域电源正常供电，备份域内的RTC都可以正常运行，备份域内的寄存器的数据会被保存，不受功耗模式影响。</p>
<h3 id="2-1-睡眠模式"><a href="#2-1-睡眠模式" class="headerlink" title="2.1 睡眠模式"></a><font size=3>2.1 睡眠模式</font></h3><p>该模式仅关闭CPU内核时钟，内核停止运行，但其它外设，包括内核外设（ NVIC、 SysTick等）依旧正常运行。 有两种方式进入睡眠模式，它的进入方式决定了从睡眠唤醒的方式 。如果通过“ WFI（ Wait for Interrupt） ”方式进入睡眠模式，则需要中断唤醒； 如果通过“ WFE（ Waitfor Event）” 方式进入睡眠模式，则需要事件唤醒。  睡眠模式的各种特性见下表：  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610165726268.png" alt="image-20230610165726268" style="zoom:80%;" />

<h3 id="2-2-停止模式"><a href="#2-2-停止模式" class="headerlink" title="2.2 停止模式  "></a><font size=3>2.2 停止模式  </font></h3><p>该模式进一步关闭HSI和HSE振荡器， 使用高速时钟作为时钟源所有外设都停止运行，也就是说在停止模式中，进一步关闭了其它所有的时钟，于是所有的外设都停止了工作。 电压调节器保持开启或低功耗模式，因此1.8V供电区域没有断电，SRAM、外设寄存器的数据依旧保留，不会消失。所以从停止模式唤醒，并重新开启时钟后，还可以从上次停止处继续执行代码。停止模式可以由任意一个外部中断(EXTI)唤醒，在停止模式中可以选择电压调节器为开模式或低功耗模式。停止模式的各种特性见下表：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610165920860.png" alt="image-20230610165920860" style="zoom:80%;" />

<p>停止模式下典型电流为20uA。</p>
<h3 id="2-3-待机模式"><a href="#2-3-待机模式" class="headerlink" title="2.3 待机模式"></a><font size=3>2.3 待机模式</font></h3><p>待机模式，它除了关闭所有的时钟，进一步关闭电压调节器，因此1.8V区域的电源也完全关闭了，SRAM、外设寄存器的数据全部丢失。也就是说，从待机模式唤醒后，唤醒后效果类似复位。由于没有之前代码的运行记录，只能对芯片复位，重新检测boot条件，从头开始执行程序。它有四种唤醒方式，分别是WKUP(PA0)引脚的上升沿，RTC闹钟事件，NRST引脚的复位和IWDG(独立看门狗)复位。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610170342069.png" alt="image-20230610170342069" style="zoom:80%;" />

<p>待机模式理想状态下，只需要2uA电流。待机模式下的输入&#x2F;输出端口状态 在待机模式下，所有的I&#x2F;O引脚处于高阻态，除了以下的引脚：</p>
<p>（1）复位引脚(始终有效)  。</p>
<p>（2）当被设置为防侵入或校准输出时的TAMPER引脚 。</p>
<p>（3）被使能的唤醒引脚。</p>
<p>从待机模式唤醒后的代码执行等同于复位后的执行(采样启动模式引脚，读取复位向量等)。电源控制&#x2F;状态寄存器(PWR_CSR)将会指示内核由待机状态退出。</p>
<h1 id="三、相关寄存器"><a href="#三、相关寄存器" class="headerlink" title="三、相关寄存器"></a><font size=3>三、相关寄存器</font></h1><h2 id="1-电源控制寄存器-PWR-CR"><a href="#1-电源控制寄存器-PWR-CR" class="headerlink" title="1. 电源控制寄存器(PWR_CR) "></a><font size=3>1. 电源控制寄存器(PWR_CR) </font></h2><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610170811343.png" alt="image-20230610170811343" style="zoom:50%;" />

<p>（1）设置PDDS位进入深度睡眠时进入待机模式。</p>
<p>（2）设置CWUF位，清除之前的WUF唤醒位。</p>
<h2 id="2-电源控制-状态寄存器-PWR-CSR"><a href="#2-电源控制-状态寄存器-PWR-CSR" class="headerlink" title="2. 电源控制&#x2F;状态寄存器(PWR_CSR) "></a><font size=3>2. 电源控制&#x2F;状态寄存器(PWR_CSR) </font></h2><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV16-STM32%E5%BC%80%E5%8F%91/LV16-29-%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86-01-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20230610170844137.png" alt="image-20230610170844137" style="zoom:50%;" />

<p>（1）设置EWUP，使能WKUP引脚用于待机模式唤醒。</p>
<p>（2）WUF唤醒标志，用来判断是否发生唤醒事件。</p>
<h1 id="四、库函数与命令"><a href="#四、库函数与命令" class="headerlink" title="四、库函数与命令"></a><font size=3>四、库函数与命令</font></h1><h2 id="1-WFI与WFE命令"><a href="#1-WFI与WFE命令" class="headerlink" title="1. WFI与WFE命令"></a><font size=3>1. WFI与WFE命令</font></h2><p>我们了解到进入各种低功耗模式时都需要调用 WFI 或 WFE 命令，它们实质上都是内核指令，在库文件 cmsis_armcc.h 中把这些指令封装成了函数 ：</p>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">  \brief   Wait For Interrupt</span></span><br><span class="line"><span class="comment">  \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> __WFI                             __wfi</span></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">  \brief   Wait For Event</span></span><br><span class="line"><span class="comment">  \details Wait For Event is a hint instruction that permits the processor to enter</span></span><br><span class="line"><span class="comment">           a low-power state until one of a number of events occurs.</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> __WFE                             __wfe</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>对于这两个指令，我们应用时一般只需要知道，调用它们都能进入低功耗模式，需要使用函数的格式“__WFI();”和“__WFE();”来调用 (因为 __wfi 及 __wfe 是编译器内置的函数，函数内部调用了相应的汇编指令)。其中 WFI 指令决定了它需要用中断唤醒，而 WFE 则决定了它可用事件来唤醒，关于它们更详细的区别可查阅《cortex-CM3&#x2F;CM4 权威指南》了解。  </p>
<h2 id="2-HAL-PWR-ConfigPVD"><a href="#2-HAL-PWR-ConfigPVD" class="headerlink" title="2. HAL_PWR_ConfigPVD()"></a><font size=3>2. HAL_PWR_ConfigPVD()</font></h2><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">  * @brief  Configures the voltage threshold detected by the Power Voltage Detector(PVD).</span></span><br><span class="line"><span class="comment">  * @param  sConfigPVD: pointer to an PWR_PVDTypeDef structure that contains the configuration</span></span><br><span class="line"><span class="comment">  *         information for the PVD.</span></span><br><span class="line"><span class="comment">  * @note   Refer to the electrical characteristics of your device datasheet for</span></span><br><span class="line"><span class="comment">  *         more details about the voltage threshold corresponding to each</span></span><br><span class="line"><span class="comment">  *         detection level.</span></span><br><span class="line"><span class="comment">  * @retval None</span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"><span class="type">void</span> <span class="title function_">HAL_PWR_ConfigPVD</span><span class="params">(PWR_PVDTypeDef *sConfigPVD)</span></span><br><span class="line">&#123;</span><br><span class="line">    <span class="comment">// ......</span></span><br><span class="line">    assert_param(IS_PWR_PVD_LEVEL(sConfigPVD-&gt;PVDLevel));</span><br><span class="line">    <span class="comment">// ......</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>这个函数是配置PVD (Power voltage Detector)检测的电压阈值。主要是通过函数中的这一句完成阈值的配置：</p>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">assert_param(IS_PWR_PVD_LEVEL(sConfigPVD-&gt;PVDLevel));</span><br><span class="line"></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \</span></span><br><span class="line"><span class="meta">                                 ((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \</span></span><br><span class="line"><span class="meta">                                 ((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \</span></span><br><span class="line"><span class="meta">                                 ((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7))</span></span><br></pre></td></tr></table></figure>

<p>不同的等级就可以配置为不同的阈值。</p>
<h2 id="3-HAL-PWR-EnterSLEEPMode"><a href="#3-HAL-PWR-EnterSLEEPMode" class="headerlink" title="3. HAL_PWR_EnterSLEEPMode()"></a><font size=3>3. HAL_PWR_EnterSLEEPMode()</font></h2><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">  * @brief Enters Sleep mode.</span></span><br><span class="line"><span class="comment">  * @note  In Sleep mode, all I/O pins keep the same state as in Run mode.</span></span><br><span class="line"><span class="comment">  * @param Regulator: Regulator state as no effect in SLEEP mode -  allows to support portability from legacy software</span></span><br><span class="line"><span class="comment">  * @param SLEEPEntry: Specifies if SLEEP mode is entered with WFI or WFE instruction.</span></span><br><span class="line"><span class="comment">  *           When WFI entry is used, tick interrupt have to be disabled if not desired as </span></span><br><span class="line"><span class="comment">  *           the interrupt wake up source.</span></span><br><span class="line"><span class="comment">  *           This parameter can be one of the following values:</span></span><br><span class="line"><span class="comment">  *            @arg PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction</span></span><br><span class="line"><span class="comment">  *            @arg PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction</span></span><br><span class="line"><span class="comment">  * @retval None</span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"><span class="type">void</span> <span class="title function_">HAL_PWR_EnterSLEEPMode</span><span class="params">(<span class="type">uint32_t</span> Regulator, <span class="type">uint8_t</span> SLEEPEntry)</span>;</span><br></pre></td></tr></table></figure>

<p>这个函数用于进入睡眠模式。</p>
<h2 id="4-HAL-PWR-EnterSTOPMode"><a href="#4-HAL-PWR-EnterSTOPMode" class="headerlink" title="4. HAL_PWR_EnterSTOPMode()"></a><font size=3>4. HAL_PWR_EnterSTOPMode()</font></h2><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">  * @brief Enters Stop mode. </span></span><br><span class="line"><span class="comment">  * @note  In Stop mode, all I/O pins keep the same state as in Run mode.</span></span><br><span class="line"><span class="comment">  * @note  When exiting Stop mode by using an interrupt or a wakeup event,</span></span><br><span class="line"><span class="comment">  *        HSI RC oscillator is selected as system clock.</span></span><br><span class="line"><span class="comment">  * @note  When the voltage regulator operates in low power mode, an additional</span></span><br><span class="line"><span class="comment">  *         startup delay is incurred when waking up from Stop mode. </span></span><br><span class="line"><span class="comment">  *         By keeping the internal regulator ON during Stop mode, the consumption</span></span><br><span class="line"><span class="comment">  *         is higher although the startup time is reduced.    </span></span><br><span class="line"><span class="comment">  * @param Regulator: Specifies the regulator state in Stop mode.</span></span><br><span class="line"><span class="comment">  *          This parameter can be one of the following values:</span></span><br><span class="line"><span class="comment">  *            @arg PWR_MAINREGULATOR_ON: Stop mode with regulator ON</span></span><br><span class="line"><span class="comment">  *            @arg PWR_LOWPOWERREGULATOR_ON: Stop mode with low power regulator ON</span></span><br><span class="line"><span class="comment">  * @param STOPEntry: Specifies if Stop mode in entered with WFI or WFE instruction.</span></span><br><span class="line"><span class="comment">  *          This parameter can be one of the following values:</span></span><br><span class="line"><span class="comment">  *            @arg PWR_STOPENTRY_WFI: Enter Stop mode with WFI instruction</span></span><br><span class="line"><span class="comment">  *            @arg PWR_STOPENTRY_WFE: Enter Stop mode with WFE instruction   </span></span><br><span class="line"><span class="comment">  * @retval None</span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"><span class="type">void</span> <span class="title function_">HAL_PWR_EnterSTOPMode</span><span class="params">(<span class="type">uint32_t</span> Regulator, <span class="type">uint8_t</span> STOPEntry)</span>;</span><br></pre></td></tr></table></figure>

<p>这个函数用于进入停止模式，这个函数有两个输入参数，分别用于控制调压器的模式及选择使用 WFI 或 WFE 停止，代码中先是根据调压器的模式配置 PWR_CR 寄存器，再把内核寄存器的 SLEEPDEEP 位置 1，这样再调用 WFI 或 WFE 命令时， STM32 就不是睡眠，而是进入停止模式了。函数结尾处的语句用于复位SLEEPDEEP 位的状态，由于它是在 WFI 及 WFE 指令之后的，所以这部分代码是在 STM32 被唤醒的时候才会执行。</p>
<p>要注意的是进入停止模式后， STM32 的所有 I&#x2F;O 都保持在停止前的状态，而当它被唤醒时， STM32使用 HSI 作为系统时钟 (8MHz) 运行，由于系统时钟会影响很多外设的工作状态，所以一般我们在唤醒后会重新开启 HSE，把系统时钟设置回原来的状态。  </p>
<h2 id="5-HAL-PWR-EnterSTANDBYMode"><a href="#5-HAL-PWR-EnterSTANDBYMode" class="headerlink" title="5. HAL_PWR_EnterSTANDBYMode()"></a><font size=3>5. HAL_PWR_EnterSTANDBYMode()</font></h2><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">  * @brief Enters Standby mode.</span></span><br><span class="line"><span class="comment">  * @note  In Standby mode, all I/O pins are high impedance except for:</span></span><br><span class="line"><span class="comment">  *          - Reset pad (still available) </span></span><br><span class="line"><span class="comment">  *          - TAMPER pin if configured for tamper or calibration out.</span></span><br><span class="line"><span class="comment">  *          - WKUP pin (PA0) if enabled.</span></span><br><span class="line"><span class="comment">  * @retval None</span></span><br><span class="line"><span class="comment">  */</span></span><br><span class="line"><span class="type">void</span> <span class="title function_">HAL_PWR_EnterSTANDBYMode</span><span class="params">(<span class="type">void</span>)</span>;</span><br></pre></td></tr></table></figure>

<p>该函数中先配置了 PDDS 寄存器位及 SLEEPDEEP 寄存器位，接着调用 __force_stores 函数确保存储操作完毕后再调用 WFI 指令，从而进入待机模式。这里值得注意的是，待机模式也可以使用WFE 指令进入的，如果有需要可以自行修改。</p>
<p>在进入待机模式后，除了被使能了的用于唤醒的 I&#x2F;O，其余 I&#x2F;O 都进入高阻态，而从待机模式唤醒后，相当于复位 STM32 芯片，程序重新从头开始执行。 </p>

    </div>

    
    
    

    <footer class="post-footer">




    <div>
        
            <div style="text-align:center;color: #ccc;font-size:14px;">
            ----------本文结束
            <i class="fas fa-fan fa-spin" style="color: #FF1493; font-size: 1rem"></i>
            感谢您的阅读----------
            </div>
        
    </div>





  
  <div class="my_post_copyright"> 
    <p><span>文章标题:</span><a href="/post/f6279550.html">LV16-29-电源管理-01-基础知识</a></p>
    <p><span>文章作者:</span><a href="/" title="欢迎访问 《苏木》 的学习笔记">苏木</a></p>
    <p><span>发布时间:</span>2023年06月11日 - 16:25</p>
    <p><span>最后更新:</span>2025年06月14日 - 00:25</p>
    <p><span>原始链接:</span><a href="/post/f6279550.html" title="LV16-29-电源管理-01-基础知识">https://sumumm.github.io/post/f6279550.html</a></p>
    <p><span>许可协议:</span><i class="fab fa-creative-commons"></i> <a rel="license" href= "https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
  </div>
  


          <div class="post-tags">
              <a href="/tags/LV16-STM32%E5%BC%80%E5%8F%91/" rel="tag"><i class="fa fa-tag"></i> LV16-STM32开发</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/12c32d69.html" rel="prev" title="LV16-29-电源管理-02-三种模式实现">
                  <i class="fa fa-angle-left"></i> LV16-29-电源管理-02-三种模式实现
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/3878988b.html" rel="next" title="LV16-28-Memory-01-内存管理基础">
                  LV16-28-Memory-01-内存管理基础 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 2017 – 
    <span itemprop="copyrightYear">2025</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">苏木</span>
  </div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">3.7m</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">225:26</span>
  </span>
</div>




    <span id="sitetime"></span>
    <script defer language=javascript>
        function siteTime()
        {
            window.setTimeout("siteTime()", 1000);
            var seconds = 1000;
            var minutes = seconds * 60;
            var hours = minutes * 60;
            var days = hours * 24;
            var years = days * 365;
            var today = new Date();
            var todayYear = today.getFullYear();
            var todayMonth = today.getMonth()+1;
            var todayDate = today.getDate();
            var todayHour = today.getHours();
            var todayMinute = today.getMinutes();
            var todaySecond = today.getSeconds();
            /*==================================================
            Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
            year        - 作为date对象的年份，为4位年份值
            month       - 0-11之间的整数，做为date对象的月份
            day         - 1-31之间的整数，做为date对象的天数
            hours       - 0(午夜24点)-23之间的整数，做为date对象的小时数
            minutes     - 0-59之间的整数，做为date对象的分钟数
            seconds     - 0-59之间的整数，做为date对象的秒数
            microseconds - 0-999之间的整数，做为date对象的毫秒数
            ==================================================*/
            var t1 = Date.UTC(2017, 
                              5, 
                              19, 
                              0, 
                              0, 
                              0); //北京时间
            var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
            var diff = t2-t1;
            var diffYears = Math.floor(diff/years);
            var diffDays = Math.floor((diff/days)-diffYears*365);
            var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
            var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
            var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
            document.getElementById("sitetime").innerHTML="已在这里 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
        }
        siteTime();
    </script>



    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/next-theme-pjax/0.6.0/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.umd.js" integrity="sha256-ytMJGN3toR+a84u7g7NuHm91VIR06Q41kMWDr2pq7Zo=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lozad.js/1.16.0/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>




  <script src="/js/third-party/fancybox.js"></script>

  <script src="/js/third-party/pace.js"></script>


  




  

  <script class="next-config" data-name="enableMath" type="application/json">false</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


 
        <div id="click-show-text"
            data-mobile = false
            data-text = 富强,民主,文明,和谐,自由,平等,公正,法制,爱国,敬业,诚信,友善
            data-fontsize = 15px
            data-random= false>
        </div>
       

      
        <script async src=https://cdn.jsdelivr.net/npm/hexo-next-mouse-effect@latest/click/showText.js></script>
      

      
    




    <script async src="/js/fancybox_param.js"></script>





<!-- APlayer本体 -->



</body>
</html>
